
* table 2

use Diversification.dta, clear

gen  GDPpcppp2= GDPpcppp* GDPpcppp

* elimination of microstates

egen mpop=mean(pop), by(reporter)
drop if mpop<1000000

encode reporter, gen(id)

* pooled estimation - col (1) (2) (3) (4)
xi: reg  HHI GDPpcppp GDPpcppp2 i.year, robust
xi: reg  T GDPpcppp GDPpcppp2 i.year, robust
xi: reg  Gini GDPpcppp GDPpcppp2 i.year, robust
xi: reg  Nber GDPpcppp GDPpcppp2 i.year, robust

* within estimation - col (5) (6) (7) (8)
xtreg  HHI GDPpcppp GDPpcppp2 , fe i(id) 
xtreg  T GDPpcppp GDPpcppp2 , fe i(id)
xtreg  Gini GDPpcppp GDPpcppp2 , fe i(id)
xtreg  Nber GDPpcppp GDPpcppp2 , fe i(id)

* Between estimation - col (9) (10) (11) (12)

collapse HHI T Gini Nber GDPpcppp GDPpcppp2, by(reporter)
reg  HHI GDPpcppp GDPpcppp2, robust
reg  T GDPpcppp GDPpcppp2, robust
reg  Gini GDPpcppp GDPpcppp2, robust
reg  Nber GDPpcppp GDPpcppp2, robust

